package org.fuys.coder.domain.act.lottery.model.vo.strategy;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Objects;

/**
 * @projectName: fuys-low-coder
 * @package: org.fuys.coder.domain.lottery.model.vo
 * @className: LotteryStrategyVO
 * @author: WangJing
 * @description: VO视图值类
 * @date: 2024/7/5 23:04
 * @version: 1.0
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class LotteryStrategyVO {
    private Integer id;
    /**
     * 抽奖策略描述
     */
    private String strategyDesc;

    /**
     * 抽奖策略模式 均匀分布或者是设置不同阶层
     */
    private Integer strategyMode;

    /**
     * 补充信息
     */
    private String extInfo;

    /**
     * 此策略适合的数量
     */
    private Integer suitNum;

    @Override
    public int hashCode(){
        return Objects.hash(id,strategyDesc);
    }

    @Override
    public boolean equals(Object o){
        if(this==o)return true;
        if(!(o instanceof LotteryStrategyVO)){
            return false;
        }
        LotteryStrategyVO that=(LotteryStrategyVO)o;
        return this.id.equals(that.getId())&&this.strategyDesc.equals(that.getStrategyDesc());
    }
}
